package mega.privacy.android.app.presentation.meeting.model

import mega.privacy.android.domain.entity.ChatRoomPermission
import mega.privacy.android.domain.entity.chat.ChatRoom
import mega.privacy.android.domain.entity.chat.ChatRoomChange

internal fun newChatRoom(
    withChatId: Long = -1L,
    withOwnPrivilege: ChatRoomPermission = ChatRoomPermission.Standard,
    withNumPreviewers: Long = 0L,
    withPeerPrivilegesByHandles: Map<Long, ChatRoomPermission> = mapOf(),
    withPeerCount: Long = 0L,
    withPeerHandlesList: List<Long> = listOf(),
    withPeerPrivilegesList: List<ChatRoomPermission> = listOf(),
    withIsGroup: Boolean = false,
    withIsPublic: Boolean = false,
    withIsPreview: Boolean = false,
    withAuthorizationToken: String? = null,
    withTitle: String = "",
    withHasCustomTitle: Boolean = false,
    withUnreadCount: Int = 0,
    withUserTyping: Long = 0L,
    withUserHandle: Long = 0L,
    withIsActive: Boolean = false,
    withIsArchived: Boolean = false,
    withRetentionTime: Long = 0L,
    withCreationTime: Long = 0L,
    withIsMeeting: Boolean = false,
    withIsWaitingRoom: Boolean = false,
    withIsOpenInvite: Boolean = false,
    withIsSpeakRequest: Boolean = false,
    withIsNoteToSelf: Boolean = false,
    withChanges: List<ChatRoomChange>? = null,
) = ChatRoom(
    chatId = withChatId,
    ownPrivilege = withOwnPrivilege,
    numPreviewers = withNumPreviewers,
    peerPrivilegesByHandles = withPeerPrivilegesByHandles,
    peerCount = withPeerCount,
    peerHandlesList = withPeerHandlesList,
    peerPrivilegesList = withPeerPrivilegesList,
    isGroup = withIsGroup,
    isPublic = withIsPublic,
    isPreview = withIsPreview,
    authorizationToken = withAuthorizationToken,
    title = withTitle,
    hasCustomTitle = withHasCustomTitle,
    unreadCount = withUnreadCount,
    userTyping = withUserTyping,
    userHandle = withUserHandle,
    isActive = withIsActive,
    isArchived = withIsArchived,
    retentionTime = withRetentionTime,
    creationTime = withCreationTime,
    isMeeting = withIsMeeting,
    isWaitingRoom = withIsWaitingRoom,
    isOpenInvite = withIsOpenInvite,
    isSpeakRequest = withIsSpeakRequest,
    isNoteToSelf = withIsNoteToSelf,
    changes = withChanges
)
